package com.sds.smarthome.foundation.entity;

import android.text.TextUtils;

import java.io.Serializable;
import java.util.List;

/**
 * Created by L on 2016/11/23.
 */

public class AppUibean implements Cloneable {

    private String version;

    private List<CcuListBean> ccuList;

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public List<CcuListBean> getCcuList() {
        return ccuList;
    }

    public void setCcuList(List<CcuListBean> ccuList) {
        this.ccuList = ccuList;
    }

    @Override
    public AppUibean clone() {
        try {
            return (AppUibean) super.clone();
        } catch (CloneNotSupportedException e) {
            e.printStackTrace();
        }
        return null;
    }

    public static class CcuListBean implements Cloneable {
        private String ccuId;

        private List<CcuRoomBean> ccuRoom;
        private List<List<Integer>> shortcutScene;
        private List<List<RoomDevBean>> shortcutDevice;

        public CcuListBean() {
        }

        public CcuListBean(String ccuId, List<CcuRoomBean> ccuRoom) {
            this.ccuId = ccuId;
            this.ccuRoom = ccuRoom;
        }

        public CcuListBean(String ccuId, List<CcuRoomBean> ccuRoom, List<List<Integer>> shortcutSence, List<List<RoomDevBean>> shortcutDevice) {
            this.ccuId = ccuId;
            this.ccuRoom = ccuRoom;
            this.shortcutScene = shortcutSence;
            this.shortcutDevice = shortcutDevice;
        }

        public List<List<Integer>> getShortcutScene() {
            return shortcutScene;
        }

        public void setShortcutScene(List<List<Integer>> shortcutScene) {
            this.shortcutScene = shortcutScene;
        }

        public List<List<RoomDevBean>> getShortcutDevice() {
            return shortcutDevice;
        }

        public void setShortcutDevice(List<List<RoomDevBean>> shortcutDevice) {
            this.shortcutDevice = shortcutDevice;
        }

        public String getCcuId() {
            return ccuId;
        }

        public void setCcuId(String ccuId) {
            this.ccuId = ccuId;
        }

        public List<CcuRoomBean> getCcuRoom() {
            return ccuRoom;
        }

        public void setCcuRoom(List<CcuRoomBean> ccuRoom) {
            this.ccuRoom = ccuRoom;
        }
    }

    public static class CcuRoomBean implements Cloneable {
        private String roomId;
        private List<RoomDevBean> roomDev;

        public CcuRoomBean() {
        }

        public CcuRoomBean(String roomId, List<RoomDevBean> roomDev) {
            this.roomId = roomId;
            this.roomDev = roomDev;
        }

        public String getRoomId() {
            return roomId;
        }

        public void setRoomId(String roomId) {
            this.roomId = roomId;
        }

        public List<RoomDevBean> getRoomDev() {
            return roomDev;
        }

        public void setRoomDev(List<RoomDevBean> roomDev) {
            this.roomDev = roomDev;
        }


    }

    public static class RoomDevBean implements Serializable, Cloneable {

        private String devType;
        private String devId;

        public String getDevType() {
            return devType;
        }

        public void setDevType(String devType) {
            this.devType = devType;
        }

        public String getDevId() {
            return devId;
        }

        public void setDevId(String devId) {
            this.devId = devId;
        }

        public RoomDevBean() {
        }

        public RoomDevBean(String devType, String devId) {
            this.devType = devType;
            this.devId = devId;
        }

        @Override
        public boolean equals(Object obj) {
            if (obj instanceof RoomDevBean) {
                return TextUtils.equals(devType, ((RoomDevBean) obj).devType)
                        && TextUtils.equals(devId, ((RoomDevBean) obj).devId);
            }
            return false;
        }

    }

}
